package com.unionftech.common.network

import com.unionftech.baselibrary.network.INetWork
import com.unionftech.common.utils.LogUtils
import okhttp3.Interceptor
import okhttp3.MediaType.Companion.toMediaType

class SimpleNetWork(
    private val urlMap: Map<String, String>,
    private val interceptors: List<Interceptor>? = null
) : INetWork {
    companion object {
        val JSON = "application/json".toMediaType()
    }

    override fun getUrlMap(): Map<String, String> {
        return urlMap
    }

    override fun getHttpLogPrint(msg: String) {
        LogUtils.d("http-log", msg)
    }

    override fun getInterceptors(): List<Interceptor>? {
        return interceptors
    }
}